declare sub Form_Paint(g as graphics)
sub Form_Paint(g as graphics)
	dim c as color
	c = new color
	c.rgb(255, 100, 0)

	g.forecolor = c
	g.fillRect(200, 10, 20, 20)
	me.title = "Joe"
end subSub Main()	dim w as window
	//we cannot touch the window until it is created
	createWindow(w,9)

	//w.title = "Hello Window"
	w.width = 300
	//w.height = 300
	//w.left = 100

	//msgbox("width=" & w.width)

	dim c as textbox
	w.CreateControl(c, 2, 2, 100, 24)
	c.left = 50

	SetEventHandler(w, "paint", Form_Paint)
	dim f as file
	f = getFile("..logo1.bmp")
	//c.picture = f.openAsPicture()

	w.picture = f.openAsPicture()end sub